From c9b04dc42a0279f0279af8de60a39b4df521bf19 Mon Sep 17 00:00:00 2001 From: John Marshall Date: Mon, 11 Jun 2018 09:40:45 +0100 Subject: [PATCH] meson build: improve function checking --- meson.build | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/meson.build b/meson.build index fbca825..ab1d042 100644 --- a/meson.build +++ b/meson.build @@ -245,11 +245,12 @@ endforeach # Check functions # general check_functions = [ - ['HAVE_GETTIMEOFDAY', 'gettimeofday'], - ['HAVE_SRANDOM', 'srandom' ], + ['HAVE_GETTIMEOFDAY', 'gettimeofday', ''], + ['HAVE_RINT', 'rint' , ''], + ['HAVE_SRANDOM', 'srandom' , ''], ] foreach func: check_functions - if cc.has_function(func[1]) + if cc.has_function(func[1], prefix: '#include ' + func[2]) conf.set(func[0], 1, description: 'Define to 1 if the @0@() function is available'.format(func[1])) endif -- 2.30.2